The QuickTime VR Manager provides functions that you can use to get and set imaging characteristics of a QuickTime VR movie.
You can use the QTVRGetVisible function to get a movie's visibility state.
Boolean QTVRGetVisible (QTVRInstance qtvr);
You can use the QTVRSetVisible function to set a movie's visibility state.
OSErr QTVRSetVisible (QTVRInstance qtvr, Booleanvisible);
The QTVRSetVisible function sets the visibility state of the QuickTime VR movie specified by the qtvr parameter to the state specified by the visible parameter. Setting the visibility state to false is useful if you want to turn off imaging a QuickTime VR movie without purging the associated data from memory. When a panoramic node's visibility state is false , the corrected image is still drawn to the prescreen buffer. You can access the data in that buffer by calling QTVRSetPrescreenImagingCompleteProc .
Use QTVRGetVisible to get the visibility state of a movie.
You can use the QTVRGetImagingProperty function to get the current value of an imaging property of a movie.
OSErr QTVRGetImagingProperty (
QTVRInstanceqtvr,
QTVRImagingModeimagingMode,
UInt32imagingProperty,
SInt32*propertyValue);
The QTVRGetImagingProperty function returns, in the long integer pointed to by the propertyValue parameter, the current value of the property specified by the imagingProperty parameter when the QuickTime VR movie specified by the qtvr parameter is in the mode specified by the imagingMode parameter.
You can use the QTVRSetImagingProperty function to set the value of an imaging property of a movie.
OSErr QTVRSetImagingProperty (
QTVRInstanceqtvr,
QTVRImagingModeimagingMode,
UInt32imagingProperty,
SInt32propertyValue);
The QTVRSetImagingProperty function sets the value of the imaging property specified by the imagingProperty parameter for the imaging mode specified by the imagingMode parameter and the QuickTime VR movie specified by the qtvr parameter to the value passed in the propertyValue parameter.
Note that default values for all imaging properties can be contained in a QuickTime VR movie file. If no defaults are specified in a movie file, the QuickTime VR Manager uses these values: for static mode, the kQTVRImagingQuality property is codecHighQuality and kQTVRImagingDirectDraw is true ; for motion mode, the kQTVRImagingQuality property is codecLowQuality and kQTVRImagingDirectDraw is true . The default correction mode is kQTVRFullCorrection for both static and motion imaging modes.
It would look strange to have one correction mode for static imaging and a different correction mode for motion imaging. As a result, you should typically set the imagingMode parameter to kQTVRAllModes when setting a property of type kQTVRImagingCorrection .
Use QTVRGetImagingProperty to get an imaging property.
You can use the QTVRUpdate function to force an immediate update of a QuickTime VR movie image.
OSErr QTVRUpdate (QTVRInstance qtvr, QTVRImagingModeimagingMode);
The QTVRUpdate function immediately updates the image for the QuickTime VR movie specified by the qtvr parameter, without waiting for the next call to MoviesTask in your application's main event loop.
If you plan to call QTVRUpdate repeatedly for a movie instance, then for improved performance you should bracket those calls with calls to the QTVRBeginUpdateStream and QTVREndUpdateStream functions (described next).
If you call QTVRUpdate after calling QTVRBeginUpdateStream but before calling QTVREndUpdateStream , the imagingMode parameter passed to QTVRUpdate must be the same as the imagingMode parameter passed to QTVRBeginUpdateStream . If you do not specify the same imaging mode to those two functions, an error will result.
Listing 2-3 illustrates the use of QTVRUpdate .
You can use the QTVRBeginUpdateStream function to begin a stream of immediate updates to a QuickTime VR movie.
OSErr QTVRBeginUpdateStream (
QTVRInstance qtvr,
QTVRImagingModeimagingMode);
The QTVRBeginUpdateStream function configures the QuickTime VR movie specified by the qtvr parameter for a stream of immediate updates to its movie image. After calling QTVRBeginUpdateStream , you perform the updates by calling QTVRUpdate . When you are finished performing the updates, call QTVREndUpdateStream . Issuing a stream of image updates in this manner is significantly faster than simply calling QTVRUpdate repeatedly (that is, not within a begin/end update sequence).
Each call to QTVRBeginUpdateStream must be balanced by a call to QTVREndUpdateStream , but you can nest these calls.
After you call QTVRBeginUpdateStream and before you call QTVREndUpdateStream , you must not change any of the QuickTime VR movie's imaging properties.
Calling QTVRBeginUpdateStream locks down large blocks of memory. As a result, you should minimize the amount of time before calling QTVREndUpdateStream .
You can use the QTVREndUpdateStream function to end a stream of immediate updates to a QuickTime VR movie.
OSErr QTVREndUpdateStream (QTVRInstance qtvr);
The QTVREndUpdateStream function unlocks the memory locked by the matching call to QTVRBeginUpdateStream for the QuickTime VR movie specified by the qtvr parameter and reverses any other actions performed by that call.
Each call to QTVRBeginUpdateStream must be balanced by a call to QTVREndUpdateStream , but you can nest these calls. For nested calls, only the final call to QTVREndUpdateStream unlocks the memory locked by the first call to QTVRBeginUpdateStream .
Use QTVRBeginUpdateStream to begin a stream of immediate updates to a QuickTime VR movie.
You can use the QTVRSetTransitionProperty function to set the value of a transition property.
OSErr QTVRSetTransitionProperty (
QTVRInstance qtvr,
UInt32transitionType,
UInt32transitionProperty,
SInt32 transitionValue);
The QTVRSetTransitionProperty function sets the value of the transition property whose type is specified by the transitionType and transitionProperty parameters for the movie specified by the qtvr parameter to the value specified by the transitionValue parameter.
Note that calling QTVRSetTransitionProperty simply sets a transition property's value; you must still call QTVREnableTransition to enable that transition effect.
You can use the QTVREnableTransition function to enable or disable a transition effect.
OSErr QTVREnableTransition (
QTVRInstance qtvr,
UInt32transitionType,
Booleanenable);
The QTVREnableTransition function enables or disables the transition property specified by the transitionType parameter for the movie specified by the qtvr parameter, as indicated by the value of the enable parameter. Once a transition effect is enabled, it is used at the appropriate time until it is disabled by a subsequent call to QTVREnableTransition .
Use QTVRSetTransitionProperty to set the value of a transition property.
| Previous | Chapter Contents | Chapter Top | Next |